<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<portlet:defineObjects/>

<fmt:setBundle basename="resources.my" scope="request"/>    

<jsp:include page="/WEB-INF/jsp/css.jsp"/>
<%@ include file="processActionException.jsp" %>
<jsp:include page="/WEB-INF/jsp/tabs.jsp"/>

<%@ include file="setBeans.jsp" %>    

<c:if test="${renderException == null}">
    <c:if test="${!empty prefsBean.userName}">
        <portlet:actionURL var="clearUserAction">
            <portlet:param name="action" value="clear-user"/>
        </portlet:actionURL>
        <table>
            <tr>
                <td class="<portlet:namespace/>-icon">
                    <img src="<c:out value="${myBean.buddyIconUrl}"/>"/>                    
                     </td>
                <td class="<portlet:namespace/>-left">
                    <fmt:message key="clearUser">
                        <fmt:param value="${prefsBean.userName}"/>
                        <fmt:param value="${pageScope['clearUserAction']}"/>
                    </fmt:message>                    
                </td>
            </tr>
        </table>
    </c:if>
    <c:if test="${!authHandler.authenticated}">
        <p><jsp:include page="auth.jsp"/></p>
    </c:if>    
    <c:if test="${empty prefsBean.userName}">
        <portlet:actionURL var="setUserNameAction">
            <portlet:param name="action" value="navigate-setUserName"/>
        </portlet:actionURL>
        <p>
            <fmt:message key="setUserName">
                <fmt:param value="${pageScope['setUserNameAction']}"/>
            </fmt:message>
        </p>
    </c:if>
    <c:if test="${authHandler.authenticated || !empty prefsBean.userName}">
        <p><jsp:include page="photos.jsp"/></p>                      
    </c:if>
</c:if>
